<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ page isELIgnored="false" %>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@ page language="java" import="java.util.*" %>
<%@ taglib uri="http://java.fckeditor.net" prefix="FCK"%>

<%
	String path = request.getContextPath();
%>
<%
	String d = request.getParameter("d");
	if(d!=null && d.equals("1"))
	{
		response.setHeader("Content-disposition","attachment; filename=daochu.xls");
	}
//获取并判断浏览器信息
	String Agent = request.getHeader("User-Agent");
	if(Agent.contains("Chrome"))
	{
		System.out.println("Chrome");
		request.setAttribute("brtype", "cbr");
	}
	else
	{
		System.out.println("!Chrome");
		request.setAttribute("brtype", "obr");
	}
	System.out.println(Agent);
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
	<title>title</title>

	<link rel="stylesheet" type="text/css" href="qtimages/css/fxke.css"/>
	<link rel="stylesheet" href="qtimages/hsgbanner.css">
	<script type="text/javascript" src="qtimages/jquery.js"></script>
	<script type="text/javascript" src="qtimages/inc.js"></script>
	<style type="text/css">
		<!--
		.STYLE2 {
			font-size: 20px;
			font-weight: bold;
			color: #078548;
		}

		-->
	</style>




	<script type="text/javascript" src="<%=path %>/js/popup.js"></script>
	<script language="JavaScript" src="<%=path %>/js/public.js" type="text/javascript"></script>
	<script type='text/javascript' src='<%=path %>/dwr/interface/loginService.js'></script>
	<script type='text/javascript' src='<%=path %>/dwr/engine.js'></script>
	<script type='text/javascript' src='<%=path %>/dwr/util.js'></script>
	<%--<script type="text/javascript" src="<%=path %>/My97DatePicker/WdatePicker.js"></script>--%>
	<script language=javascript src='<%=path %>/js/My97DatePicker/WdatePicker.js'></script>

	<script language="javascript">
		//导出信息
		function daochu()
		{
			var url="<%=path %>/dxAll.action?d=1";
			window.location.href=url;
		}
		//上传文件
		function up()
		{
			var pop=new Popup({ contentType:1,isReloadOnClose:false,width:400,height:200});
			pop.setContent("contentUrl","<%=path %>/upload/upload.jsp");
			pop.setContent("title","文件上传");
			pop.build();
			pop.show();
			//另一红上传方式可以参照upx
		}
		//添加信息
		function dxAddQian()
		{
			<c:if test="${sessionScope.user==null}">
			alert("请先登录");
			</c:if>
			<c:if test="${sessionScope.user!=null}">
			var url="<%=path %>/qiantai/dx/dxAddQian.jsp";
			window.location.href=url;
			</c:if>
		}
		//删除信息
		function dxDel(id)
		{
			if(confirm('您确定删除吗?'))
			{
				window.location.href="<%=path %>/dx?typec=dxDel&id="+id;
			}
		}
		//修改信息
		function dxGet(id)
		{
			window.location.href="<%=path %>/dx?typec=dxGet&id="+id;
		}
		//图片预览
		function over(picPath)
		{
			if (picPath=="")picPath="/images/default.jpg";
			x = event.clientX;
			y = event.clientY;
			document.all.tip.style.display = "block";
			document.all.tip.style.top = y;
			document.all.tip.style.left = x+10;
			document.all.photo.src = ".."+picPath;
		}
		function out()
		{
			document.all.tip.style.display = "none";
		}
		function down1(fujianPath,fujianYuashiMing)
		{
			var url="<%=path %>/updown/updown.jsp?fujianPath="+fujianPath+"&fujianYuashiMing="+fujianYuashiMing;
			url=encodeURI(url);
			url=encodeURI(url);
			window.open(url,"_self");
		}
		function go(index)
		{
			document.form123.index.value=index;
			document.form123.action="<%=path %>/dx?typec=dxManaQian"
			document.form123.submit();
		}
		function dxSet(id,property,value)
		{
			if(confirm('您确定操作吗?'))
			{
				var form = document.getElementById("formset");
				form.getElementsByTagName("INPUT")[0].name = property;
				form.getElementsByTagName("INPUT")[0].value = value;
				document.formset.action="<%=path %>/dx?typec=dxSet&id="+id
				document.formset.submit();
				//window.location.href="<%=path %>/dxSet.action?id="+id+"&isurl=1"+"&"+property+"="+value;
			}
		}
		function typechange()
		{
			//alert("typechange start");
			//document.formAdd.typename.value=document.formAdd.type.text;
			var obj = document.getElementById("type"); //定位id				//document.getElementById(id)
			var index = obj.selectedIndex; // 选中索引
			var text = obj.options[index].text; // 选中索引值
			//alert(index);

			document.getElementById("typename").value = text; //okok
			//document.formAdd.typename.value=text; //error
			//alert("typechange end");
		}
		function init()
		{
			/*classNameLowerAdd.jsp.notuse.typechangejs*/
			/*typechange();*/
			
			/*leibieSelect();*/
		}

		

		//子表管理示例代码
		/*			function tupianGetByxinwen_id(xinwen_id)
                    {
                        var url="<%=path %>/tupianGetByxinwen_id.action?xinwen_id="+xinwen_id;
				window.location.href=url;
			}*/
		/*classNameLowerAll.jsp.SontableNameLowerGetbyFatheridjsList*/
	</script>

</head>



<body onload="init()">

<!--新头部的开始-->
<%@ include file="qttop.jsp" %>
<!--新头部的结束-->

<!--产品中心ban开始-->
<%--<div class="newsban"></div>--%>
<!--产品中心ban结束-->

<!--ban图片切换开始-->
<%@ include file="bht.jsp"%>
<!--ban图片切换结束-->

<!--主体内容的开始-->
<div class="fxmain">
	<!--顶部类别开始-->
	<div class="fx_fenlei">
		<div class="leibei fl">
			<ul>
				<li><a class="diyi">信息介绍 </a></li>
				<!--<li><a href="#">行业动态</a></li>
                <li><a href="#">保养常识</a></li>
                <li><a href="#">技术支持</a></li>-->
			</ul>
		</div>
		<%--<div class="dqwz fr">
            当前位置：<a href="index.jsp">网站首页</a> &gt; 公司新闻
        </div>--%>
	</div>
	<!--顶部类别结束-->
	<!--详细内容的开始-->
	<div class="fxmain_nr">

		<form name="form1" id="form1" method="post" action="<%=path %>/dx?typec=dxSearchQian">

			            类别:
            <input type="text" name="leibie" id="leibie" style='border:solid 1px #000000; color:#666666' size="12" />
            <%--内容:
            <input type="text" name="content" id="content" style='border:solid 1px #000000; color:#666666' size="12" />--%>


			<input type="submit" name="Submit" value="查找" style='border:solid 1px #000000; color:#666666'/>
		</form>

		<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" bordercolor="00FFFF"
			   style="border-collapse:collapse" class="newsline">
			<tr>
				<td width="30" align="center" bgcolor="">序号</td>

				<%--colunmRemarks--%>
								    <td bgcolor='' align="center" >类别</td>
				    <%--<td bgcolor='' align="center" >内容</td>--%>
				    <td bgcolor='' align="center" >时间</td>



				<td width="30" align="center" bgcolor="">详细</td>
			</tr>

			<c:forEach items="${requestScope.page.data}" var="dx" varStatus="s">

				<tr>
					<td width="30" align="center">
							${s.index+1}
					</td>

						<%--colunmNameValue--%>
										<td bgcolor="" align="center">
						<c:if test="${fn:length(dx.leibie)>'16'}">
							${fn:substring(dx.leibie,0,16)}...
						</c:if>
						<c:if test="${fn:length(dx.leibie)<='16'}">
							${dx.leibie}
						</c:if>
					</td>
					
					<%--<td bgcolor="" align="center">
						<c:if test="${fn:length(dx.content)>'16'}">
							${fn:substring(dx.content,0,16)}...
						</c:if>
						<c:if test="${fn:length(dx.content)<='16'}">
							${dx.content}
						</c:if>
					</td>--%>
					<td bgcolor="" align="center">
						<c:if test="${fn:length(dx.addtime)>'16'}">
							${fn:substring(dx.addtime,0,16)}...
						</c:if>
						<c:if test="${fn:length(dx.addtime)<='16'}">
							${dx.addtime}
						</c:if>
					</td>
					



					<td width="30" align="center">
						<a href="<%=path %>/dx?typec=dxDetailQian&id=${dx.id}">
							详细
						</a>
					</td>
				</tr>
			</c:forEach>
		</table>
		<br>


		<%@ include file="/hsgfenye.jsp"%>
		<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" bordercolor="#00FFFF"
			   style="border-collapse:collapse" class="newsline">
			<tr>
				<td align="center" bgcolor="">
					<%--
                    <input type="button" value="添加" style="width: 120px;" onclick="dxAddQian()" />
                    --%>
					<input type="button" value="打印" style="width: 60px;" onClick="javascript:window.print()" />
					<input type="button" value="返回" style="width: 60px;" onClick="javascript:history.back()" />

				</td>

			</tr>
		</table>

	</div>

	<!--详细内容的结束-->

</div>

<!--主体内容的结束-->


<!--底部的开始-->
<%@ include file="qtdown.jsp" %>
<!--底部的结束-->

</body>
</html>


